package com.hero.basicsystem.dao.ibatis;

import com.hero.basicsystem.dao.IUserdepartmentdutyDAO;
import com.hero.basicsystem.entity.Userdepartmentduty;
import com.hero.basicsystem.entity.UserdepartmentdutyExample;
import com.hero.basicsystem.entity.UserdepartmentdutyKey;
import com.hero.web.dao.IbatisBaseDao;
import java.util.List;

public class UserdepartmentdutyDAOImpl extends IbatisBaseDao<Userdepartmentduty, UserdepartmentdutyExample> implements IUserdepartmentdutyDAO {

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table userdepartmentduty11
     *
     * @ibatorgenerated Sun Jun 12 08:41:54 GMT 2011
     */
    public UserdepartmentdutyDAOImpl() {
        super();
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table userdepartmentduty11
     *
     * @ibatorgenerated Sun Jun 12 08:41:54 GMT 2011
     */
    public int countByExample(UserdepartmentdutyExample example) {
        Integer count = (Integer)  getSqlMapClientTemplate().queryForObject("userdepartmentduty.ibatorgenerated_countByExample", example);
        return count;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table userdepartmentduty11
     *
     * @ibatorgenerated Sun Jun 12 08:41:54 GMT 2011
     */
    public int deleteByExample(UserdepartmentdutyExample example) {
        int rows = getSqlMapClientTemplate().delete("userdepartmentduty.ibatorgenerated_deleteByExample", example);
        return rows;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table userdepartmentduty11
     *
     * @ibatorgenerated Sun Jun 12 08:41:54 GMT 2011
     */
    public int deleteByPrimaryKey(UserdepartmentdutyKey key) {
        int rows = getSqlMapClientTemplate().delete("userdepartmentduty.ibatorgenerated_deleteByPrimaryKey", key);
        return rows;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table userdepartmentduty11
     *
     * @ibatorgenerated Sun Jun 12 08:41:54 GMT 2011
     */
    public void insert(Userdepartmentduty record) {
        getSqlMapClientTemplate().insert("userdepartmentduty.ibatorgenerated_insert", record);
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table userdepartmentduty11
     *
     * @ibatorgenerated Sun Jun 12 08:41:54 GMT 2011
     */
    public void insertSelective(Userdepartmentduty record) {
        getSqlMapClientTemplate().insert("userdepartmentduty.ibatorgenerated_insertSelective", record);
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table userdepartmentduty11
     *
     * @ibatorgenerated Sun Jun 12 08:41:54 GMT 2011
     */
    @SuppressWarnings("unchecked")
    public List<Userdepartmentduty> selectByExample(UserdepartmentdutyExample example) {
        List<Userdepartmentduty> list = getSqlMapClientTemplate().queryForList("userdepartmentduty.ibatorgenerated_selectByExample", example);
        return list;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table userdepartmentduty11
     *
     * @ibatorgenerated Sun Jun 12 08:41:54 GMT 2011
     */
    public Userdepartmentduty selectByPrimaryKey(UserdepartmentdutyKey key) {
        Userdepartmentduty record = (Userdepartmentduty) getSqlMapClientTemplate().queryForObject("userdepartmentduty.ibatorgenerated_selectByPrimaryKey", key);
        return record;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table userdepartmentduty11
     *
     * @ibatorgenerated Sun Jun 12 08:41:54 GMT 2011
     */
    public int updateByExampleSelective(Userdepartmentduty record, UserdepartmentdutyExample example) {
        UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
        int rows = getSqlMapClientTemplate().update("userdepartmentduty.ibatorgenerated_updateByExampleSelective", parms);
        return rows;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table userdepartmentduty11
     *
     * @ibatorgenerated Sun Jun 12 08:41:54 GMT 2011
     */
    public int updateByExample(Userdepartmentduty record, UserdepartmentdutyExample example) {
        UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
        int rows = getSqlMapClientTemplate().update("userdepartmentduty.ibatorgenerated_updateByExample", parms);
        return rows;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table userdepartmentduty11
     *
     * @ibatorgenerated Sun Jun 12 08:41:54 GMT 2011
     */
    public int updateByPrimaryKeySelective(Userdepartmentduty record) {
        int rows = getSqlMapClientTemplate().update("userdepartmentduty.ibatorgenerated_updateByPrimaryKeySelective", record);
        return rows;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table userdepartmentduty11
     *
     * @ibatorgenerated Sun Jun 12 08:41:54 GMT 2011
     */
    public int updateByPrimaryKey(Userdepartmentduty record) {
        int rows = getSqlMapClientTemplate().update("userdepartmentduty.ibatorgenerated_updateByPrimaryKey", record);
        return rows;
    }

    /**
     * This class was generated by Apache iBATIS ibator.
     * This class corresponds to the database table userdepartmentduty11
     *
     * @ibatorgenerated Sun Jun 12 08:41:54 GMT 2011
     */
    private static class UpdateByExampleParms extends UserdepartmentdutyExample {
        private Object record;

        public UpdateByExampleParms(Object record, UserdepartmentdutyExample example) {
            super(example);
            this.record = record;
        }

        public Object getRecord() {
            return record;
        }
    }
}